package com.shudes.game;

import java.util.*;

import junit.framework.*;

import com.shudes.pt.builder.*;
import com.shudes.pt.container.*;
import com.shudes.pt.db.*;
import com.shudes.pt.pojo.*;
import com.shudes.util.*;

public class GameTest extends TestCase {
	
	public GameTest(String name) { 
		super(name); 
	}
	
//	public void testHoleCards() { 
//		HoleCards hole;
//		HoleCards hole2; 
//		hole = new HoleCards(new Card(Rank.ACE, Suit.CLUB), new Card(Rank.KING, Suit.CLUB)); 
//		System.out.println(hole); 
//
//		hole2 = CardCollectionFactory.holeCards("Ac","Kc"); 
//		System.out.println(hole2); 
//		
//		System.out.println(hole2.equals(hole)); 
//	}
//	
//	public void testBoard() { 
//		Board board; 
//		
//		board = CardCollectionFactory.board("As Kd Jh"); 
//		System.out.println(board); 
//	}
	
	public void testGame() { 
		final Long ID = new Long(9091); 
		PTSession session; 
		GamePlayerBuilder playerBuilder; 
		List<Game> games; 
//		List<GamePlayer> gamePlayers;
		SessionContext context; 
		
		context = new SessionContext(); 
		session = new PTSessionBuilder(context).buildById(ID);				
				
		games = new GameBuilder(new SessionContext()).forSession(session);
		playerBuilder = new GamePlayerBuilder(context); 
		Game game = games.iterator().next();
		GamePlayerContainer container =  playerBuilder.forGame(game); 
		System.out.println(Dumper.INSTANCE.dumpSideways(container.getHerosAction()));

	}

}
